package com.zego.wawaji.third.zego.im.callback;

import com.noble.library.basic.log.PLogger;
import com.zego.wawaji.third.zego.im.listener.ZegoListener;
import com.zego.zegoliveroom.callback.IZegoLivePlayerCallback;
import com.zego.zegoliveroom.entity.ZegoStreamQuality;

/**
 * Created by Su on 2017/12/9.
 */

public class ZegoLivePlayerCallback implements IZegoLivePlayerCallback {
    private ZegoListener mListener;

    public ZegoLivePlayerCallback(ZegoListener listener) {
        this.mListener = listener;
    }


    @Override
    public void onPlayStateUpdate(int i, String s) {
        PLogger.d("livePlay ====onPlayStateUpdate= errorCode:  " + i + ",  StreamId: " + s);
        if (mListener != null)
            mListener.onPlayStateUpdate(i, s);
    }

    @Override
    public void onPlayQualityUpdate(String s, ZegoStreamQuality zegoStreamQuality) {
        PLogger.d("livePlay ====onPlayQualityUpdate= " + s);
    }

    @Override
    public void onInviteJoinLiveRequest(int i, String s, String s1, String s2) {
        PLogger.d("livePlay ====onInviteJoinLiveRequest= " + i + ", " + s + ", " + s1 + ", " + s2);
    }

    @Override
    public void onRecvEndJoinLiveCommand(String s, String s1, String s2) {
        PLogger.d("livePlay ====onRecvEndJoinLiveCommand= " + s + ", " + s1 + ", " + s2);
    }

    @Override
    public void onVideoSizeChangedTo(String s, int i, int i1) {
        PLogger.d("livePlay ====onVideoSizeChangedTo= " + s + ", " + i + ", " + i1);
        if (mListener != null)
            mListener.onVideoSizeChangedTo(s, i, i1);
    }
}
